x11: keep track of the screen pixel size by calculating the bounding box of monitors
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 22 Nov 2013 17:33:02 +0000 (18:33 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Mon, 25 Nov 2013 16:19:46 +0000 (17:19 +0100)
commitd1414211bf2fa3bb26ca859f99afb68a2756af9f
tree4d6080f93517dd76957d0b4cae8e025a4c12f143
parent118b09c68c6cd51f5b4ffc3125310cbefb8b4baf
x11: keep track of the screen pixel size by calculating the bounding box of monitors

This is so we always have the latest information given by XRandR (or other), and not
rely on Core protocol information that might not have been updated yet.

This is specially visible when a monitor is connected (less frequent) or disconnected
(much more frequent), callbacks on GdkScreen::monitors-changed that call
gdk_screen_get_width/height() could get the screen size previous to the monitor
rearrangement.

So in order to fix this, keep track of the latest monitors information, and calculate
the bounding box in order to know the screen size.

https://bugzilla.gnome.org/show_bug.cgi?id=715029
gdk/x11/gdkscreen-x11.c
gdk/x11/gdkscreen-x11.h